{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "aerial-making",
   "metadata": {},
   "source": [
    "# Proxy Scheduler Local Test\n",
    "\n",
    "\n",
    "## Setup\n",
    "\n",
    "\n",
    "* `make start-proxy` \n",
    "* `make start-mlserver`\n",
    "* `make start-rclone`\n",
    "* `make start-agent`"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "blond-atlas",
   "metadata": {},
   "source": [
    "## No Auth Example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "jewish-competition",
   "metadata": {},
   "outputs": [],
   "source": [
    "!grpcurl -d '{\"request\": {\\\n",
    "              \"model\":{ \\\n",
    "                  \"meta\":{\"name\":\"iris\"},\\\n",
    "                  \"modelSpec\":{\"uri\":\"gs://seldon-models/mlserver/iris\",\\\n",
    "                           \"requirements\":[\"sklearn\"],\\\n",
    "                           \"memoryBytes\":200},\\\n",
    "                   \"deploymentSpec\":{\"replicas\":1}\\\n",
    "                }},\\\n",
    "                \"version\":1\\\n",
    "            }' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis/ \\\n",
    "         -proto ../../apis/mlops/proxy/proxy.proto  0.0.0.0:8100 seldon.mlops.proxy.SchedulerProxy/LoadModel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "measured-charity",
   "metadata": {},
   "outputs": [],
   "source": [
    "!grpcurl -d '{\\\n",
    "              \"model\":{\"name\":\"iris\"},\\\n",
    "              \"version\":1\\\n",
    "             }' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis/ \\\n",
    "         -proto ../../apis/mlops/proxy/proxy.proto  0.0.0.0:8100 seldon.mlops.proxy.SchedulerProxy/UnloadModel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "least-lindsay",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
